import com.sun.xml.internal.ws.api.client.SelectOptimalEncodingFeature;

import java.util.Scanner;

public class Demo_02 {
    public static void main(String[] args) {
        Scanner scan =new Scanner( System.in);
           int i=0;
           float b=0.0f;
           System.out.println("请输入整数：");
           if(scan.hasNextInt()){
                int s =  scan.nextInt();
                System.out.println("输入的整数为"+s);
           }else {
               System.out.println("你输入的不是整数");
           }
            System.out.println("请输入小数：");
           if(scan.hasNextFloat()){
               float m =scan.nextFloat();
               System.out.println("你输入的小数为"+m);
           }else {
               System.out.println("你输入的不是整数");
           }


           scan.close();
    }
}
